import React from 'react'
export default class Child extends React.Component {

    constructor(props) {
        super(props);
        this.state = {
            count: 0
        };
    }
    componentWillMount(){
        console.log('componentWillMount');
    }
    componentDidMount(){
        console.log('componentDidMount');
    }
    componentWillReceiveProps(newProps){
        console.log('will props'+ newProps);
    }
    shouldComponentUpdate(){
        console.log('shoud update');
        return true;
    }
    componentWillUpdate(){
        console.log('will update');
    }
    componentDidUpdate(){
        console.log('did update');
    }

    render(){
        console.log('child render');
        return(
            <div>              
                <p>{this.props.name}</p>
            </div>
        )
    }
}